Memory management of ws objects:

	use case 1:
		ws_object_new_from_foreign (XID xid)

	use case 2:
		ws_object_new ();


Issues:
	- underlying object can go away without warning (someone else
	  destroys it).

	- when the proxy is destroyed, we want to destroy the underlying
	  as well.



Resolution 1:
	- proxy objects never own the underlying object
		- not good in cases like WsRegion

	- proxy objects always destroy the underlying
		- not good in case of windows

		- have a 'disown' method that will cause the proxy
		  to be disconnected from the underlying - as if
		  the underlying was destroyed by someone else.


Resolution:
	new_wrapper (XID xid)
		- does not own xid
		- when wrapper goes away, xid remains
		- possibly has "destroy" method that will cause xid
		  to be destroyed

Resolution:

	new_wrapper (XID xid)
		- does not own xid
		- 

		- takes ownership of xid,
		- most windows will be referenced by the window system
		- bad idea for dealing with windows owned by someone else.
	
	new (void)
		- creates xid
		- will be destroyed when wrapper goes away.

	perhaps simply have a bit "owns_xid" that indicates whether
	the xid should go away.

	ref/unref
		- when refcount reaches 0, wrapper and xid goes away.

	foo_get_bar()
		- returns a pointer to a bar, but no ownership is passed

	if someone else destroys and xid, then it will be destroyed, and
	the destroynotify will cause the hash table to be updated.

Resolution:
	don't destroy windows, but destroy everything else
	- inconsistent.


-----> Resolution <--------
	- have window_new() and window_new_foreign()
	- foreign windows are not destroyed, others are.
	- like gdk, sort of
	- generally have foo_new() and foo_new_foreign(), (though only have
	  the foreign when it makes sense).
	- actually we need both
		foo_new()		-> created and owned by us
		foo_new_from_xid()	-> not created, but owned by us
		foo_new_foreign()	-> not created or owned by us
	- also
		foo_get_xid()
	- will work well with GL stuff.
